package com.entity.phone_records;

import com.baomidou.mybatisplus.annotation.*;
import com.config.CustomLocalDateTimeDeserializer;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;

import java.time.LocalDateTime;

/**
 * 电话记录表实体类
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("phone_records")
@ApiModel("电话记录表实体类")
public class PhoneRecord {

    @ApiModelProperty(value = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "创建人（接电话的人）")
    @TableField("create_by")
    private String createBy;

    @ApiModelProperty(value = "客户公司")
    @TableField("customer_company")
    private String customerCompany;

    @ApiModelProperty(value = "客户手机号")
    @TableField("customer_phone")
    private String customerPhone;

    @ApiModelProperty(value = "客户名称")
    @TableField("customer_name")
    private String customerName;

    @ApiModelProperty(value = "问题详细")
    @TableField("issue_details")
    private String issueDetails;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "created_time", fill = FieldFill.INSERT)
    @JsonDeserialize(using = CustomLocalDateTimeDeserializer.class)
    private LocalDateTime createdTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
    @JsonDeserialize(using = CustomLocalDateTimeDeserializer.class)
    private LocalDateTime updatedTime;

    @ApiModelProperty(value = "状态（已解决、未解决）")
    @TableField("status")
    private String status = "未解决"; // 默认状态为未解决
}